import { Button } from 'antd'
import { useRef } from 'react'

const Page: React.FC = () => {
    // 处理按钮点击提交事件
    const handleSend = () => {
        console.log(nameInputRef)
        // {current: input}
        // input 为 inputDom
    }
    const nameInputRef = useRef<HTMLInputElement>(null)

    return (
        <div className='page'>
            <label htmlFor=''>
                <input type='text' ref={nameInputRef} />
            </label>
            <Button onClick={handleSend}>提交</Button>
        </div>
    )
}
export default Page

